<?php
// +----------------------------------------------------------------------
// | XiaMiCMF - 代码如诗
// +----------------------------------------------------------------------
// | Copyright (c) 2015-2016 http://shujuwajue.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 小虾米 <509129@qq.com>
// +----------------------------------------------------------------------
namespace PcHome\Model;

use Common\Model\CommonModel;

class ArticleTagModel extends CommonModel
{
    protected $tableName = 'cms_article_tag';

    public function getTagsByArticleId($article_id) {
        $article_id = (int) $article_id;
        $data = $this->where(array('article_id' => $article_id))->select();
        $return = array();
        foreach ($data as $val) {
            $return[$val['tag_id']] = $val['tag_id'];
        }
        return $return;
    }
}

?>